<?php

namespace app\services;

class TestService
{
	public function test($a = null, $b = null)
	{
		$data = [];
		$encodeId = \IdCrypt::encodeId($a);
		$decodeId = \IdCrypt::decodeId($encodeId);

		$num = 100000;
		for ($i = 1; $i <= $num; $i++) {
			$encodeId = \IdCrypt::encodeId($i);
			$decodeId = \IdCrypt::decodeId($encodeId);
			$data[] = [
				"id" => $i,
				"encode" => $encodeId,
				"decodeId" => $decodeId,
			];
		}

		prin($data);
	}
}